#include <linux/sched.h>
#include <linux/printk.h>
#include <asm/ptrace.h>

void show_regs(struct pt_regs *regs)
{
    printk("\r\ncurrent: %s\r\n", current->name);

    printk("r4:%x\r\n", regs->r[0]);
    printk("r5:%x\r\n", regs->r[1]);
    printk("r6:%x\r\n", regs->r[2]);
    printk("r7:%x\r\n", regs->r[3]);
    printk("r8:%x\r\n", regs->r[4]);
    printk("r9:%x\r\n", regs->r[5]);
    printk("r10:%x\r\n", regs->r[6]);
    printk("r11:%x\r\n", regs->r[7]);

    printk("r0:%x\r\n", regs->hwsave.r0);
    printk("r1:%x\r\n", regs->hwsave.r1);
    printk("r2:%x\r\n", regs->hwsave.r2);
    printk("r3:%x\r\n", regs->hwsave.r3);
    printk("r12:%x\r\n", regs->hwsave.r12);
    printk("lr:%x\r\n", regs->hwsave.lr);
    printk("pc:%x\r\n", regs->hwsave.pc);
    printk("psr:%x\r\n", regs->hwsave.psr);
}
